package ac.github.os.internal.core.condition.impl.common

import ac.github.os.api.OriginSkillAPI
import ac.github.os.internal.core.condition.Condition
import ac.github.os.internal.core.config.StringConfig
import ac.github.os.internal.core.config.get
import ac.github.os.internal.session.Session
import taboolib.common.platform.Awake

@Awake
class AnyCondition : Condition {
    override fun doScreen(session: Session, config: StringConfig): Boolean {
        val list = config.get("val", listOf(""), single = true) ?: return false
        return list.any { OriginSkillAPI.screen(session, listOf(it)) }
    }

    override val namespace: String
        get() = "any"
}